<?php

namespace Wantuch\MailerBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="messages")
 */
class Message
{
    /**
     * @ORM\Column(type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @ORM\Column(type="string", length=100, nullable=true)
     */
    protected $title;
    
    /**
     * @ORM\Column(type="string", length=100, nullable=true)
     */
    protected $sender;

    /**
     * @ORM\Column(type="text", nullable=true)
     */
    protected $receivers;

    /**
     * @ORM\Column(type="text", nullable=true)
     */
    protected $attachments;
    
    /**
     * @ORM\Column(type="datetime", nullable=true)
     */
    protected $sendDate;
    
    /**
     * @ORM\Column(type="string", length=100, nullable=true)
     */
    protected $isSent;
    
    /**
     * @ORM\Column(type="text", nullable=true)
     */
    protected $template;
    
    /**
     * @ORM\Column(type="text", nullable=true)
     */
    protected $content;
    
    /**
     * @ORM\Column(type="datetime", nullable=true)
     */
    protected $createdAt;
    
    
    /**
     * @ORM\ManyToOne(targetEntity="Campaign", inversedBy="messages")
     * @ORM\JoinColumn(name="campaign_id", referencedColumnName="id", nullable=true)
     **/
    private $campaign;
    
    
 

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set title
     *
     * @param string $title
     * @return Message
     */
    public function setTitle($title)
    {
        $this->title = $title;

        return $this;
    }

    /**
     * Get title
     *
     * @return string 
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Set sender
     *
     * @param string $sender
     * @return Message
     */
    public function setSender($sender)
    {
        $this->sender = $sender;

        return $this;
    }

    /**
     * Get sender
     *
     * @return string 
     */
    public function getSender()
    {
        return $this->sender;
    }

    /**
     * Set receivers
     *
     * @param string $receivers
     * @return Message
     */
    public function setReceivers($receivers)
    {
        $this->receivers = $receivers;

        return $this;
    }

    /**
     * Get receivers
     *
     * @return string 
     */
    public function getReceivers()
    {
        return $this->receivers;
    }

    /**
     * Set attachments
     *
     * @param string $attachments
     * @return Message
     */
    public function setAttachments($attachments)
    {
        $this->attachments = $attachments;

        return $this;
    }

    /**
     * Get attachments
     *
     * @return string 
     */
    public function getAttachments()
    {
        return $this->attachments;
    }

    /**
     * Set sendDate
     *
     * @param \DateTime $sendDate
     * @return Message
     */
    public function setSendDate($sendDate)
    {
        $this->sendDate = $sendDate;

        return $this;
    }

    /**
     * Get sendDate
     *
     * @return \DateTime 
     */
    public function getSendDate()
    {
        return $this->sendDate;
    }

    /**
     * Set isSent
     *
     * @param string $isSent
     * @return Message
     */
    public function setIsSent($isSent)
    {
        $this->isSent = $isSent;

        return $this;
    }

    /**
     * Get isSent
     *
     * @return string 
     */
    public function getIsSent()
    {
        return $this->isSent;
    }

    /**
     * Set template
     *
     * @param string $template
     * @return Message
     */
    public function setTemplate($template)
    {
        $this->template = $template;

        return $this;
    }

    /**
     * Get template
     *
     * @return string 
     */
    public function getTemplate()
    {
        return $this->template;
    }

    /**
     * Set content
     *
     * @param string $content
     * @return Message
     */
    public function setContent($content)
    {
        $this->content = $content;

        return $this;
    }

    /**
     * Get content
     *
     * @return string 
     */
    public function getContent()
    {
        return $this->content;
    }

    /**
     * Set createdAt
     *
     * @param \DateTime $createdAt
     * @return Message
     */
    public function setCreatedAt($createdAt)
    {
        $this->createdAt = $createdAt;

        return $this;
    }

    /**
     * Get createdAt
     *
     * @return \DateTime 
     */
    public function getCreatedAt()
    {
        return $this->createdAt;
    }

    /**
     * Set campaign
     *
     * @param \Wantuch\MailerBundle\Entity\Campaign $campaign
     * @return Message
     */
    public function setCampaign(\Wantuch\MailerBundle\Entity\Campaign $campaign = null)
    {
        $this->campaign = $campaign;

        return $this;
    }

    /**
     * Get campaign
     *
     * @return \Wantuch\MailerBundle\Entity\Campaign 
     */
    public function getCampaign()
    {
        return $this->campaign;
    }
}
